Skip to content

ci: CI modeled on yetone/magpie (macOS leg, plugin tests + coverage, package check, tag release) - #29

Merged
Birfy merged 3 commits into
ThinkFlowLab:mainfrom
Birfy:ci-magpie
Oct 14, 2026
Merged

Birfy merged 3 commits into
ThinkFlowLab:mainfrom
Birfy:ci-magpie

Conversation

@Birfy

@Birfy Birfy commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Implements #30: CI modeled on yetone/magpie's test.yml and release.yml, adapted to FlyBot.

Builds on #31 (slim PR gate) and #35 (Compatibility nightly), both now on main. Latest main is merged into this branch with a merge commit, so no history was rewritten.

Checklist (from #30)

  • Test: main's runs finish (cancel-in-progress only off main); lint and the client-bundle check run before tests; 5-minute timeouts on npm ci and the DSH install
  • Test is one PR-gate job, ubuntu-latest · Node 24 · DSH 0.2.0-rc.2 (as in ci: slim Test matrix to ubuntu Node 24 + DSH 0.2.0-rc.2 #31). The other legs stay in ci: Compatibility nightly + local Mac CI (follows #31) #35's nightly.yml (Compatibility), which this PR leaves untouched. I dropped my own compat.yml in favour of it. The gate's steps live in a composite action, .github/actions/flybot-tests, which nightly.yml could adopt later to get the plugin suites too. The gate keeps ci: Compatibility nightly + local Mac CI (follows #31) #35's push paths-ignore for docs.
  • Test: social and tree plugin suites (incl. plugins/tree/test/tree.test.js); test/tree-host.test.js keeps running in ds-bot's suite
  • Coverage on the PR-gate job in one run over ds-bot, social and tree (incl. tree-host and tree.test.js): job summary plus coverage-lcov artifact
  • package job: .github/scripts/check-pack.mjs packs ds-bot, social and tree and checks every main/exports/files entry is packed and no test/dev files are; strict tsc on types/*.d.ts; CHANGELOG Unreleased check; actionlint
  • tests-ok aggregate (test + package)
  • release.yml on v* tags: tag must match ds-bot/package.json, waits for a green Test run on the commit, then publishes the tarballs with the version's CHANGELOG section (.github/scripts/release-notes.mjs). Uses GITHUB_TOKEN only. It cannot run from a PR, so it is untested until the first tag.
  • SHA-pinned actions, least-privilege permissions, persist-credentials: false
  • CodeQL (javascript-typescript, actions); Dependabot (actions, npm) with grouping and a 7-day cooldown
  • Deferred: UI preview recordings on PRs (magpie's ui-preview.yml; would use dev/ui-shots.mjs)
  • Deferred: JS typecheck (checkJs needs @types/node and fixes first)
  • Not applicable: Docker image (magpie's docker.yml)
  • Branch protection: for maintainers, see below

Changes from the earlier apache/magpie-based draft

  • Dropped: zizmor, the two-workflow labeler and .github/labeler.yml, the PR template.
  • Kept, because they are clearly useful: SHA pins and persist-credentials: false, tests-ok, CodeQL, Dependabot (it keeps the SHA pins current), actionlint (now a step in package).

Branch protection

Main still requires all four legs. Since #31, three of those checks are never reported on PRs again, so PRs stay blocked until protection changes. Set the required checks to:

  • ubuntu-latest · Node 24 · DSH 0.2.0-rc.2 (keep)
  • package and tests-ok (new, recommended). tests-ok alone would also do, since it needs both.
  • Remove ubuntu-latest · Node 24 · DSH 0.2.1-alpha.1, ubuntu-latest · Node 22 · DSH 0.2.0-rc.2 and windows-latest · Node 24 · DSH 0.2.0-rc.2. They now run as compat · … in Compatibility (nightly.yml), which is not required.
  • Optional: Analyze (javascript-typescript) and Analyze (actions).

Closes #30

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T13:18:09.320721Z c0507e1 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@Birfy
Birfy marked this pull request as draft October 14, 2026 12:53
Keep a cheap PR/push shipgate: one required job (ubuntu-latest ·
Node 24 · DSH 0.2.0-rc.2). Drop windows, Node 22, and DSH
0.2.1-alpha.1 from the required matrix; they can return later as
nightly/manual. Lint, npm test, and build-client --check are unchanged.

Verifier: not run (workflow-only change; CI will exercise on this PR).
@Birfy
Birfy marked this pull request as ready for review October 14, 2026 12:54
@Birfy
Birfy marked this pull request as draft October 14, 2026 12:59
@Birfy Birfy changed the title ci: Magpie-style CI (hardened matrix, plugin tests, coverage, CodeQL, zizmor, actionlint, labeler, Dependabot) ci: CI modeled on yetone/magpie (macOS leg, plugin tests + coverage, package check, tag release) Oct 14, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1d538b82c6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/dependabot.yml

- package-ecosystem: npm
# Plugins only declare peer dependencies (no lockfile), so ds-bot is the one npm project.
directory: /ds-bot

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include the harness npm project in Dependabot

When this weekly job runs, Dependabot reads the npm project in the configured directory; ds-bot/package.json has no workspace entry for dev/harness, so /ds-bot does not discover dev/harness/package.json. Consequently its exact jsdom and oxlint dependencies, which supply test/lint tooling, never receive these updates. Add a separate npm update entry for the harness while retaining the DSH ignore there.

AGENTS.md reference: AGENTS.md:L30-L30

Useful? React with 👍 / 👎.

…wLab#31)

- Test (PR gate, one job as in ThinkFlowLab#31, same required name): lint and bundle check first,
  ds-bot + social + tree suites (incl. tree-host and plugins/tree/test/tree.test.js) in
  one coverage run (job summary + lcov artifact); main's runs are never cancelled.
- package: npm-pack ds-bot, social and tree and check main/exports/files are packed and
  no test/dev files; strict tsc on types/*.d.ts; CHANGELOG Unreleased check; actionlint.
- tests-ok: one aggregate check.
- Compatibility (nightly, manual, and on PRs touching it): Windows, macOS, Node 22 and
  DSH 0.2.1-alpha.1 through the same composite action, job names prefixed 'compat ·'.
- Release on v* tags: version check, wait for a green Test run, tarballs + CHANGELOG notes.
- CodeQL (javascript-typescript, actions) and Dependabot; actions pinned to SHAs with
  persist-credentials off and read-only permissions. No secrets.
@Birfy
Birfy marked this pull request as ready for review October 14, 2026 13:10

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c0507e1040

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve queued Test runs on main

When three main pushes overlap (A running, tagged B pending, then C arriving), GitHub Actions replaces B because a concurrency group retains only one pending run; cancel-in-progress: false protects only A, the running member. Since every main SHA still shares test-refs/heads/main, B can lose its only Test run, and the Wait for a green Test run on this commit step in .github/workflows/release.yml then treats that cancelled conclusion as failure and rejects the release. Give main runs a SHA-specific group or omit concurrency grouping for main.

Useful? React with 👍 / 👎.

run: node .github/scripts/check-pack.mjs
- name: Typecheck the plugin API (types/*.d.ts, strict)
working-directory: ds-bot
run: npx --yes -p typescript@5.9.3 tsc --noEmit --strict --skipLibCheck types/*.d.ts

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Stop skipping the declaration files being checked

When types/flybot.d.ts acquires an unknown type or conflicting declaration, this package job still succeeds: tsc --help --all defines --skipLibCheck as “Skip type checking all .d.ts files,” and types/*.d.ts supplies only such files. This makes the new strict API gate a no-op for semantic declaration errors, allowing broken published types through; remove this flag or compile a .ts consumer fixture instead.

Useful? React with 👍 / 👎.

# Conflicts:
#	.github/workflows/test.yml
@Birfy
Birfy merged commit 318eab9 into ThinkFlowLab:main Oct 14, 2026
6 checks passed
@Birfy Birfy mentioned this pull request Oct 14, 2026
Birfy pushed a commit that referenced this pull request Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build a complete CI pipeline modeled on magpie (yetone/magpie)

3 participants